<?php
header("Content-type: text/html; charset=utf-8");
//数据库连接  mysqli
$host="127.0.0.1";
$user="root";
$pwd="root";
$db="xinhuadb";
$conn=new mysqli($host,$user,$pwd,$db);
//判断连接服务器
if($conn->connect_error){
	//echo "连接失败！".$conn->connect_error;
	die("连接失败: " . $conn->connect_error);
}
?>